g_list_free_1 (cur);
}
+ gtk_widget_path_append_for_widget (path, child);
+
return path;
}
* @child: a child of @container
*
* Returns a newly created widget path representing all the widget hierarchy
- * from the toplevel down to @child (this one not being included).
+ * from the toplevel down to and including @child.
*
* Returns: A newly created #GtkWidgetPath
**/
path = GTK_CONTAINER_CLASS (gtk_frame_parent_class)->get_path_for_child (container, child);
if (child == priv->label_widget)
- gtk_widget_path_iter_add_class (path, -1, GTK_STYLE_CLASS_FRAME);
+ gtk_widget_path_iter_add_class (path,
+ gtk_widget_path_length (path) - 2,
+ GTK_STYLE_CLASS_FRAME);
return path;
}
GtkNotebook *notebook;
GtkNotebookPage *page;
GtkWidgetPath *path;
- GtkRegionFlags flags;
GList *c;
path = GTK_CONTAINER_CLASS (gtk_notebook_parent_class)->get_path_for_child (container, widget);
if (!c)
return path;
- flags = _gtk_notebook_get_tab_flags (notebook, page);
- gtk_widget_path_iter_add_region (path, -1, GTK_STYLE_REGION_TAB, flags);
+ gtk_widget_path_iter_add_region (path,
+ gtk_widget_path_length (path) - 2,
+ GTK_STYLE_REGION_TAB,
+ _gtk_notebook_get_tab_flags (notebook, page));
return path;
}
break;
}
+ gtk_widget_path_append_for_widget (path, child);
+
return path;
}
* situation.
*/
widget->priv->path = gtk_widget_path_new ();
+
+ gtk_widget_path_append_for_widget (widget->priv->path, widget);
}
- gtk_widget_path_append_for_widget (widget->priv->path, widget);
-
if (widget->priv->context)
gtk_style_context_set_path (widget->priv->context,
widget->priv->path);